package com.android.jump;


import android.graphics.Bitmap;
import android.graphics.Canvas;


public class PrintNum
{
    Bitmap numbers[];
    public PrintNum(Bitmap nBitmap[]) {
        numbers = nBitmap;
    }

    public void doDraw(Canvas canvas, int num, int x, int y) {
        int bits[] = new int[10];
        int i = 9;
        do {
            bits[i--] = num % 10;
        } while ((num = num / 10) != 0);
        for (int j = i + 1; j < 10; j++) {
            canvas.drawBitmap(numbers[bits[j]], x, y, null);
            x += numbers[bits[j]].getWidth();
        }
    }
}
